/* editor.h */
/* author: jiqing (jiqingwu@gmail.com) */
/* create: 2011-12-26 */

#ifndef _EDITOR_H_
#define _EDITOR_H_

#include <stdbool.h>
#include "map.h"

#define DEFAULT_MAP_WIDTH 20
#define DEFAULT_MAP_HEIGHT 15

typedef struct _map_editor {
    Map *map;
    SDL_Surface *screen;

    SDL_Surface *surf_tile;
    short surf_size_x;
    short surf_size_y;

    bool show_grid;
    bool show_block;

    SDL_Rect res_rect;
    SDL_Rect msg_rect;
    SDL_Rect runtime_msg_rect;

    short map_select_x;
    short map_select_y;
    short res_select_x;
    short res_select_y;

    unsigned short key_pressed;
    char runtime_msg[256];
    bool running;
} MapEditor;



#endif
